#include "pch.h"

Solvers::~Solvers() {
	for (auto & iter : solvers) {
		delete iter.second;
	}
}

SolverInterface * Solvers::getIns(const std::string & name) {
	static Solvers ins;

	if (ins.solvers.find(name) == ins.solvers.end()) {
		if (name == "MCTSSolver") {
			ins.solvers[name] = new MCTSSolver();
		}
	}

	return ins.solvers[name];
}